/*
 * Created on 12-Jun-2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package game.jrogue;

/**
 * This class contains initialisation routines for the monster library
 * 
 */
public class Monster {
    public static final String TAKE_THE_MONEY_AND_RUN = "TakeTheMoneyAndRun";
    public static final String TAKE_THE_MAGIC_AND_RUN = "TakeTheMagicAndRun";
    
    static void init() {
        initBase();
        initGoblinoids();
        initCritters();
        initDogs();
        initFrogs();
        initSpiders();
        initRalkans();
        initSlimes();
        initCats();
        initBears();
        initPlants();
        initNamedFoes();
        initEyes();
        initSnakes();
        initDragons();
        initWorms();
        initBirds();
        initInsects();
		initCentipedes();
        initBandits();
        initChaosForces();
        initUndead();
        initDemons();
        initImps();
		initBigHumanoids();
        initBigNasties();
        initElementals();
        initKobolds();
        initUrchins();
        initVoidlings();
    }
    
    public static class BreathAttackScript extends Script {
    	/**
		 * 
		 */
		private static final long serialVersionUID = 3257006536114256182L;

		public boolean handle(Thing t, Event e) {
    		int time=e.getStat("Time");
    		int rate=getStat("Rate");
    		
    		if (RPG.test(rate,time)) {
    			Thing f=AI.findFoe(t);
    			if (f==null) return false;
    			
    			String type=getString("BreathType");
    			String desc=getString("BreathDescription");
    			
    			Game.instance().doBreath(t.x,t.y,f.x,f.y,getStat("BoltImage"),10.0);
    			
    			t.visibleMessage(t.getTheName()+" "+t.verb("breathe")+" "+desc+" at "+f.getTheName());
    			f.damage(getStat("Power"),type);
    		}
    		
    		return false;
    	}
    }
    
    public static Script breathAttack(String type, String desc, int rate, int power, int c) {
    	Script s=new BreathAttackScript();
    	s.set("BreathType",type);
    	s.set("BreathDescription",desc);
    	s.set("Rate",rate);
    	s.set("Power",power);
    	s.set("BoltImage",c);
    	return s;
    }

    public static class ItemDamageHit extends Script {
    	private static final long serialVersionUID = 3761124920951715636L;

        public ItemDamageHit (String target, String dt, int chance, int power) {
    		set("SpecialHitTarget",target);    		
    		set("SpecialHitChance",chance);    		
    		set("SpecialHitDamageType",dt);    		
    		set("SpecialHitPower",power);    		
    	}

    	public boolean handle(Thing t, Event e) {
    		int chance=getStat("SpecialHitChance");
    		if (RPG.d(100)>chance) return false;
    		String type= getString("SpecialHitTarget");
    		// Game.warn(type+" special hit");
    		
    		Thing tt=e.getThing("Target");
    		Thing target=null;
    		if (type.equals("소지품")) {
    			Thing[] ts=tt.getItems();
    			if (ts.length>0) target=ts[RPG.r(ts.length)];
    		} else if (type.equals("wielded")) {
    			Thing[] ts=tt.getWieldedItems();
    			if (ts.length>0) target=ts[RPG.r(ts.length)];
    		} else if (type.startsWith("[")) {
    			Thing[] ts=tt.getFlaggedContents(type.substring(1,type.length()-2));
    			if (ts.length>0) target=ts[RPG.r(ts.length)];    			
    		}
    		
    		if (target!=null) {
    			Damage.inflict(target,getStat("SpecialHitPower"),getString("SpecialHitDamageType"));
    			return true;
    		}
    		
    		return false;
    	}
    }

    public static class SpecialHit extends Script {
    	private static final long serialVersionUID = 3762814904666633524L;

        public SpecialHit(String type,int chance) {
    		set("SpecialHitChance",chance);
    		set("SpecialHitType",type);
        }

        public boolean stealSomething(Thing target, Thing actor, String whatType) {
            Thing[] things = null;
            if (whatType == null) {
                things = target.getItems();
            } else {
                things = target.getFlaggedContents(whatType);
            }
            if (things.length == 0) {
                return false; // nothing to steal
            }
            Thing whatToSteal = things[RPG.r(things.length)];
            if (whatToSteal.y > 0) {
                return false; // don't steal wielded stuff
            } else if (whatToSteal.getFlag("IsTheftProof")) {
                return false; // don't steal theft proof stuff
            } else { // steal the item!
                target.message(Text.krSub(actor.getTheName(), "이") + " 당신의 " +
                               Text.krSub(whatToSteal.getName(Game.hero()), "을") + " 훔쳐갑니다!");
                actor.addThingWithStacking(whatToSteal);
                Being.utiliseItems(actor);
                return true;
            }
        }

        public boolean stealSomething(Thing target, Thing actor, String whatType, int tries) {
            // steal up to tries things
            boolean value = false;
            for (int i = 0; i < tries; i++) {
                if (stealSomething(target,actor,whatType)) {
                    value = true;
                }
            }
            return value;
        }

        public boolean handle(Thing thing, Event e) {
    		int chance = getStat("SpecialHitChance");
            if (RPG.d(100) > chance) {
                return false;
            }
    		String type= getString("SpecialHitType");
    		// Game.warn(type+" special hit");
    		
    		Thing target = e.getThing("Target");
            if (!RPG.test(thing.getStat("SK"),target.getStat("SK"),thing,target)) {
                return false;
            }
    		if (type.equals("steal")) {
    			return stealSomething(target,thing,null);
            } else if (type.equals("StealMoney")) {
                return stealSomething(target,thing,"IsMoney");
            } else if (type.equals(TAKE_THE_MONEY_AND_RUN)) {
                if (stealSomething(target,thing,"IsMoney")) {
                    String message=Text.krSub(thing.getTheName(), "이") + " 펑 하고 연기와 함께 사라집니다!";
                	if(teleportAway(thing)) {
                        target.message(message);
                        return true;
                    }
                }
            } else if (type.equals(TAKE_THE_MAGIC_AND_RUN)) {
                if (stealSomething(target,thing,"IsMagicItem",3)) {
                    String message=Text.krSub(thing.getTheName(), "이") + " 안개구름 속으로 사라집니다!";
                    if(teleportAway(thing)) {
                    	Game.message(message);
                        return true;
                    }
                }
            }
    		return false;
    	}

        /*
         * Do this locally because we want a different message
         * than the one in the spell effect script for teleportation
         */
        public boolean teleportAway(Thing target) {
            Map map = target.getMap();
            if(map == null) return false;
            Point point = map.findFreeSquare();
            if(point == null) return false;
            Movement.teleport(target, map, point.x, point.y);
            return true;
        }
    }
    
    // create stats with a little bit of natural variation
    // to keep game-to-game differences interesting
    static void stats(Thing t,int SK, int ST, int AG, int TG, int IN, int WP, int CH, int CR) {
    	t.set(RPG.ST_SK,RPG.ln(SK,0.05));
        t.set(RPG.ST_ST,RPG.ln(ST,0.05));
        t.set(RPG.ST_AG,RPG.ln(AG,0.05));
        t.set(RPG.ST_TG,RPG.ln(TG,0.05));
        t.set(RPG.ST_IN,RPG.ln(IN,0.05));
        t.set(RPG.ST_WP,RPG.ln(WP,0.05));
        t.set(RPG.ST_CH,RPG.ln(CH,0.05));
        t.set(RPG.ST_CR,RPG.ln(CR,0.05));
    }
    
    /** This will multiply *every* stat of the given Thing by the given factor.  
     * @param t Thing strengthened
     * @param factor The value with which to multiply each stat by
     */
    static void strengthen(Thing t, double factor) {
    	for (int i=0; i<RPG.stats.length; i++) {
    		String stat=RPG.stats[i];
    		int a=t.getBaseStat(stat);
    		t.set(stat,(int)(a*factor));
    	}
    	t.multiplyStat("ARM",factor);
    }
    
    static void initBase() {
        Thing t;
        
        // base monster template
        t=Lib.extendCopy("기본 몬스터", "기본 존재");
        t.set("빈도",50);
        t.set("IsMonster",1);
        t.set("IsHostile",1);
        t.set("IsLiving",1);
        t.set("최소레벨",1);
        t.set("최대레벨",100);
        t.set("ViewRange",6);
        t.set("경험치값",4);
        t.set("도덕성향","E+");
        t.set("아스키코드","m");
        Lib.add(t);
        
        t=Lib.extend("기본 휴머노이드", "기본 몬스터");
        t.set("IsHumanoid",1);
        t.set("IsIntelligent",1);
        t.set("최소레벨",5);
        t.set("최대레벨",100);
        t.set("도덕성향","E");
        t.set("이미지",260); // random critter
        Lib.add(t);
    }
    
    static void initUrchins() {
        Thing t;
        
        t=Lib.extend("나무 꼬마정령", "기본 휴머노이드");
        stats(t,6,4,9,3,5,4,4,3);
        t.set("최소레벨",2);
        t.set("이미지",341);
        t.set("DefaultThings","[IsMushroom]"); 
        t.set(Skill.UNARMED,1);
        t.set("OnHit",new SpecialHit("steal",30));
        t.set("아스키코드","u");
        Lib.add(t);

        t=Lib.extend("레프리콘", "기본 휴머노이드");
        stats(t,26,4,29,5,5,14,4,3);
        t.set("최소레벨",7);
        t.set("이미지",349);
        t.set("DefaultThings","15* 금화,50%[IsFood]"); 
        t.set(Skill.UNARMED,1);
        t.incStat(Skill.MAGICRESISTANCE,3);
        t.set("OnHit", new SpecialHit(TAKE_THE_MONEY_AND_RUN, 100));
        t.set("아스키코드","L");
        Lib.add(t);

        t=Lib.extend("님프", "기본 휴머노이드");
        stats(t,16,14,19,13,9,14,4,13);
        t.set("최소레벨",11);
        t.set("이미지",352);
        t.set("ARM",20);
        t.set("공격속도",150);
        t.set("이동속도",150);
        t.set("DefaultThings","25%[IsRunestone],10%[IsRing],20%[IsSpellBook],5%[IsWand],25%[IsScroll]"); 
        t.set(Skill.UNARMED,2);
        t.incStat(Skill.MAGICRESISTANCE,4);
        t.set("OnHit", new SpecialHit(TAKE_THE_MAGIC_AND_RUN, 100));
        t.set("아스키코드","n");
        Lib.add(t);

        t=Lib.extend("핑크 꼬마정령", "기본 휴머노이드");
        stats(t,26,4,29,5,5,14,4,3);
        t.set("최소레벨",9);
        t.set("이미지",340);
        t.set("DefaultThings","[IsFood]"); 
        t.set(Skill.UNARMED,1);
        t.set("OnHit",new SpecialHit("steal",50));
        t.set("아스키코드","u");
        Lib.add(t);
        
        t=Lib.extend("바위 꼬마정령", "기본 휴머노이드");
        stats(t,16,14,19,13,9,14,4,13);
        t.set("최소레벨",14);
        t.set("이미지",345);
        t.set("ARM",20);
        t.set("공격속도",150);
        t.set("이동속도",150);
        t.set("DefaultThings","[IsRunestone]"); 
        t.set(Skill.UNARMED,1);
        t.set("OnHit",new SpecialHit("steal",100));
        t.set("아스키코드","u");
        Lib.add(t);
    }
    
    static void initKobolds() {
        Thing t;
        
        t=Lib.extend("기본 코볼드", "기본 휴머노이드");
        t.set("IsKobold",1);
        stats(t,6,4,9,3,5,4,4,3);
        t.set("최소레벨",2);
        t.set("이미지",342);
        t.set("DefaultThings","25%[IsWeapon],20%[IsFood]");
        t.set("아스키코드","k");
    	Lib.add(t);
    	
    	t=Lib.extend("코볼드","기본 코볼드");
        stats(t,6,4,9,3,5,4,4,3);
        t.set("최소레벨",2);
        t.set("최대레벨",10);
        t.set("이미지",342);
        t.set("DefaultThings","15%[IsWeapon],10%[IsFood]");
    	Lib.add(t);
    	
    	t=Lib.extend("코볼드 전사","코볼드");
        stats(t,6,4,9,3,5,4,4,3);
        t.set("최소레벨",4);
        t.set("최대레벨",12);
        t.set("이미지",348);
        t.set(Skill.UNARMED,1);
        t.set("ARM",2);
        t.set("DefaultThings","40%[IsWeapon],10%[IsArmour]");
    	Lib.add(t);
    	
    	t=Lib.extend("코볼드 족장","코볼드 전사");
        Monster.strengthen(t,2.0);
        t.set("최소레벨",8);
        t.set("이미지",348);
        t.set(Skill.ATTACK,1);
        t.set(Skill.DEFENCE,1);
        t.set(Skill.UNARMED,2);
        t.set("DefaultThings","[IsWeapon],40%[IsArmour]");
    	Lib.add(t);
    	
    	t=Lib.extend("코볼드 마술사","코볼드");
        stats(t,10,4,19,13,15,14,8,13);
        t.set("최소레벨",10);
        t.set("이미지",348);
        t.set(Skill.ATTACK,1);
        t.set(Skill.DEFENCE,2);
        t.set(Skill.UNARMED,1);
        t.set(Skill.CASTING,2);
        t.set("DefaultThings","[IsStaff],[IsSpell],[IsSpell]");
    	Lib.add(t);
    }
 
    static void initBigHumanoids() {
        Thing t;
		
		t=Lib.extend("기본 대형 휴머노이드","기본 휴머노이드");
		Lib.add(t);
		
        t=Lib.extend("언덕 거인", "기본 대형 휴머노이드");
        stats(t,16,46,19,88,2,68,6,7);
		t.set(Skill.UNARMED,1);
		t.set(Skill.DEFENCE,2);
        t.set("이미지",260);
        t.set("최소레벨",19);
		t.set("DefaultThings","30% [IsClub], [IsFood]");
        Lib.add(t);
		
        t=Lib.extend("오우거", "기본 대형 휴머노이드");
        stats(t,17,36,19,38,5,48,6,7);
		t.set(Skill.UNARMED,1);
		t.set(Skill.DEFENCE,1);
        t.set("이미지",264);
        t.set("최소레벨",16);
		t.set("DefaultThings","50% [IsWeapon], 40% [IsFood],30% [IsCoin]");
        Lib.add(t);
		
    }

	
    static void initBandits() {
        Thing t;
        t=Lib.extend("기본 산적", "기본 휴머노이드");
        stats(t,10,8,9,9,7,8,6,7);
        t.set("IsBandit",1);
        t.set("최소레벨",5);
        t.set("이미지",84);
        t.set(Skill.UNARMED,1);
        t.set("DefaultThings","5% [IsFood],5%[IsWeapon],5% 1 금화, 50% [IsCoin], 40% 20 동화");
        t.set("아스키코드","h");
        Lib.add(t);
        
        t=Lib.extend("산적", "기본 산적");
        Lib.add(t);
		
		t=Lib.extend("산적 궁수", "기본 산적");
        t.set("DefaultThings","[IsBow],10 [IsArrow],5% 1 금화, 50% 3 은화, 40% 20 동화");
        Lib.add(t);

        t=Lib.extend("소매치기", "기본 산적");
        t.set("OnHit",new SpecialHit("steal",30));
        t.set("이미지",102);
        Lib.add(t);
        
        t=Lib.extend("폭력배", "기본 산적");
        t.set("이미지",82);
        t.set(Skill.DEFENCE,1);
        Lib.add(t);
        
        t=Lib.extend("돌연변이", "기본 산적");
        stats(t,6,6,9,8,7,8,6,7);
        t.set("이미지",261);
        t.set("최소레벨",3);
        Lib.add(t);
        
        t=Lib.extend("용병", "기본 산적");
        stats(t,15,18,12,18,7,13,5,9);
        t.set("이미지",85);
        t.set("최소레벨",11);
        t.set(Skill.DEFENCE,2);
        t.set(Skill.ATTACK,1);
        t.set("DefaultThings","50%[IsWeapon],10%[IsArmour],5%[IsItem],10 금화");
        Lib.add(t);
        
        t=Lib.extend("검사", "기본 산적");
        stats(t,22,14,17,12,7,13,5,9);
        t.set("이미지",80);
        t.set("최소레벨",13);
        t.set(Skill.ATHLETICS,2);
        t.set(Skill.FEROCITY,3);
        t.set(Skill.DEFENCE,4);
        t.set(Skill.ATTACK,4);
        t.set("행운",20);
        t.set("DefaultThings","100%[IsSword],20%[IsArmour],16 금화");
        Lib.add(t);
        
        t=Lib.extend("해적","검사");
        t.incStat("ARM",4);
        t.set("이미지",21);
        t.set("공격속도",130);
        t.set("최소레벨",15);
        Lib.add(t);
        
        t=Lib.extend("해적 통솔자","해적");
        Monster.strengthen(t,2);
        t.set("이미지",21);
        t.set("공격속도",160);
        t.set("최소레벨",18);
        Lib.add(t);
        
        t=Lib.extend("해적 선장","해적");
        Monster.strengthen(t,3);
        t.set("이미지",21);
        t.set("공격속도",200);
        t.set("최소레벨",18);
        Lib.add(t);
        
        t=Lib.extend("용병 대장", "용병");
        stats(t,25,23,22,28,17,23,15,19);
        t.set("이미지",86);
        t.set("최소레벨",14);
        t.set(Skill.DEFENCE,3);
        t.set(Skill.ATTACK,2);
        t.set("DefaultThings","100%[IsWeapon],100%[IsArmour],5%[IsItem],10 백금화");
        Lib.add(t);
        
        t=Lib.extend("용병 지휘관", "용병 대장");
        stats(t,45,43,42,48,37,33,35,39);
        t.set("이미지",87);
        t.set("최소레벨",20);
        t.set(Skill.DEFENCE,4);
        t.set(Skill.ATTACK,4);
        t.set("이동속도",150);
        t.set("공격속도",200);   
        t.set("DefaultThings","100%[IsWeapon],100%[IsArmour],100%[IsShield],[IsItem]");
        Lib.add(t);
        
        t=Lib.extend("사술사", "기본 산적");
        stats(t,15,18,12,18,7,13,5,9);
        t.set("이미지",121);
        t.set("최소레벨",13);
        t.set("빈도",20);
        t.set(Skill.CASTING,2);
        t.set("DefaultThings","50%[IsStaff],10%[IsSpellBook],10%[IsWand],100%[IsSpell],100%[IsSpell]");
        Lib.add(t);
    }
    
    static void initChaosForces() {
        Thing t;
        t=Lib.extend("기본 암흑 추종자", "기본 휴머노이드");
        stats(t,10,8,9,9,7,8,6,7);
        t.set("IsChaotic",1);
        t.set("최소레벨",10);
        t.set("이미지",51);
        t.set("아스키코드","h");
        Lib.add(t);
        
        t=Lib.extend("암흑 추종자","기본 암흑 추종자");
        stats(t,10,12,9,14,7,18,7,9);
        t.set(Skill.UNARMED,1);
        t.set(Skill.ATTACK,1);
        t.set(Skill.DEFENCE,1);
        t.set("이미지",51);
        t.set("최소레벨",15);
        t.set("DefaultThings","[IsWeapon],30% [IsArmour]");        
        Lib.add(t);
        
        t=Lib.extend("암흑 전사","기본 암흑 추종자");
        stats(t,20,22,19,34,17,48,17,19);  
        t.set("ARM",25);
        t.set(Skill.UNARMED,3);
        t.set(Skill.ATTACK,3);
        t.set(Skill.DEFENCE,2);
        t.set("이미지",52);
        t.set("최소레벨",18);
        t.set("DefaultThings","[IsWeapon],[IsArmour]");        
        Lib.add(t);
        
        t=Lib.extend("암흑 기사","암흑 전사");
        t.set("이미지",52);
        t.set("최소레벨",24);
        Monster.strengthen(t,3.0);
        t.set("DefaultThings","[IsWeapon],[IsArmour],[IsItem]");        
        Lib.add(t);
        
        t=Lib.extend("암흑 용자","암흑 전사");
        t.set("이미지",53);
        t.set("최소레벨",29);
        Monster.strengthen(t,10.0);
        Lib.add(t);
        
        t=Lib.extend("암흑 영웅","암흑 전사");
        t.set("이미지",53);
        t.set("최소레벨",34);
        Monster.strengthen(t,20.0);
        Lib.add(t);
    }
    
    static void initVoidlings() {
    	Thing t;
    	
    	t=Lib.extend("기본 혼돈의 악령","기본 몬스터");
    	t.set("IsLiving",0);
    	t.set("IsFlying",1);
    	t.set("IsVoidling",1);
    	t.set("ARM",100);
    	t.set("RES:fire",100);
    	t.set("RES:ice",100);
    	t.set("RES:acid",100);
    	t.set("RES:disintegrate",1000);
    	t.set("RES:shock",100);
        t.set("이미지",406);
        t.set("IsViewBlocking",1);
        t.set("아스키코드","V");
    	Lib.add(t);
    	
    	t=Lib.extend("혼돈의 악령","기본 혼돈의 악령");
    	t.set("최소레벨",38);
    	stats(t,300,300,500,200,300,500,0,300);
    	t.set("이동속도",300);
    	t.set("공격속도",300);
        t.set("UnarmedWeapon",Lib.create("소멸 공격"));
    	t.set("시체그래픽","Void");
        Lib.add(t);
    	
    	t=Lib.extend("상급 혼돈의 악령","혼돈의 악령");
    	t.set("최소레벨",40);
    	strengthen(t,2);
    	Lib.add(t);
    	
    	t=Lib.extend("혼돈의 주인","혼돈의 악령");
    	t.set("최소레벨",42);
    	stats(t,300,300,500,200,300,500,0,300);
    	strengthen(t,3);
        t.addHandler("OnAction",Scripts.generator("혼돈의 악령",100));
    	Lib.add(t);
    }
    static void initBigNasties() {
    	Thing t;

        t=Lib.extend("기본 거대 몬스터", "기본 몬스터");
        t.set("아스키코드","M");
        t.set("IsBeast",1);
        Lib.add(t);
    	
    	// horrendous gobbler by Catherine Boyce
        t=Lib.extend("끔찍한 고블러", "기본 거대 몬스터");
        stats(t,130,160,70,200,5,240,3,10);
        t.set("UnarmedWeapon",Lib.create("맹독 공격"));
        t.set("이동속도",200);
        t.set("공격속도",300);
        t.set("시체그래픽","blood pool,bone");
        t.addHandler("OnAction",Scripts.generator("파리떼",100));
        t.addHandler("OnAction",breathAttack("독","poisonous fumes",2,60,41));
        t.set("RES:poison",1000);
        t.set("ARM",160);
        t.set("공포점수",6);
        t.set("최소레벨",28);
        t.set("이미지",424);
        Lib.add(t);
        
        t=Lib.extend("보랏빛 악몽", "기본 거대 몬스터");
        stats(t,40,60,50,50,15,50,3,10);
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        t.set("이동속도",100);
        t.set("공격속도",100);
        t.set("시체그래픽","blood pool,bone");
        t.addHandler("OnAction",Scripts.generator("보랏빛 악몽",30));
        t.set("RES:poison",100);
        t.set("ARM",30);
        t.set("공포점수",4);
        t.set("최소레벨",22);
        t.set("이미지",423);
        Lib.add(t);
        
        t=Lib.extend("그라이폰", "기본 거대 몬스터");
        stats(t,120,60,150,70,15,90,10,5);
        t.set("UnarmedWeapon",Lib.create("손톱 공격"));
        t.set("이동속도",300);
        t.set("공격속도",300);
        t.set("시체그래픽","blood pool,bone");
        t.set("ARM",20);
        t.set("공포점수",2);
        t.set("최소레벨",23);
        t.set("이미지",361);
        Lib.add(t);
        
        t=Lib.extend("악어", "기본 거대 몬스터");
        stats(t,40,90,20,90,2,30,1,3);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        t.set("이동속도",80);
        t.set("공격속도",100);
        t.set("시체그래픽","blood pool,bone");
        t.set("ARM",10);
        t.set("최소레벨",18);
        t.set("이미지",367);
        Lib.add(t);
        
        t=Lib.extend("히드라", "기본 거대 몬스터");
        stats(t,70,90,40,130,12,70,1,33);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        t.set("이동속도",90);
        t.set("공격속도",400);
        t.set("시체그래픽","blood pool,bone");
        t.set("ARM",60);
        t.set("최소레벨",24);
        t.set("이미지",362);
        Lib.add(t);
    }
    
    static void initEyes() {
    	Thing t;
    	
        t=Lib.extend("기본 눈알괴물", "기본 몬스터");
        t.set("IsEye",1);
        t.set("IsLiving",1);
        t.set("IsFlying",1);
        t.set("이동속도",70);
        t.set("빈도",30);
        t.set("RES:piercing",-13);
        t.incStat(Skill.MAGICRESISTANCE,3);
        t.set("아스키코드","e");
		t.set("UnarmedWeapon",Lib.create("정기흡수 공격"));
		Lib.add(t);   
        
        t=Lib.extend("부유 눈알괴물","기본 눈알괴물");
        Monster.stats(t,10,20,15,20,40,40,2,10);
        t.set("이미지",373);
        t.set("최소레벨",10);
    	Lib.add(t);
    	
        t=Lib.extend("마법 눈알괴물","기본 눈알괴물");
        Monster.stats(t,12,20,15,20,40,40,2,10);
        t.set("이미지",373);
        t.set("최소레벨",15);
        t.set(Skill.CASTING,3);
        t.set(Skill.FOCUS,1);
        t.set("DefaultThings","[IsSpell],[IsSpell],[IsSpell],[IsSpell]");
    	Lib.add(t);
    	
        t=Lib.extend("사악한 눈알괴물","기본 눈알괴물");
        Monster.stats(t,22,33,25,30,50,60,6,20);
        t.set("ARM",20);
        t.set("이미지",372);
        t.set("최소레벨",20);
        t.set("공격속도",150);
        t.set(Skill.DEFENCE,1);
        t.set(Skill.CASTING,3);
        t.set(Skill.FOCUS,2);
        t.set("DefaultThings","[IsSpell],[IsSpell],[IsSpell],[IsSpell]");
    	Lib.add(t);
    	
        t=Lib.extend("눈알 주시자","기본 눈알괴물");
        Monster.stats(t,32,53,35,70,80,160,16,30);
        t.set("ARM",50);
        t.set("이미지",368);
        t.set("최소레벨",25);
        t.set("공격속도",150);
        t.set(Skill.DEFENCE,1);
        t.set(Skill.CASTING,4);
        t.set(Skill.FOCUS,4);
        t.set("DefaultThings","[IsSpell],[IsSpell],[IsSpell],[IsSpell],[IsSpell],[IsSpell]");
    	Lib.add(t);
    }
    
    static void initElementals() {
    	Thing t;

        t=Lib.extend("기본 정령", "기본 몬스터");
        t.set("IsElemental",1);
        t.set("IsLiving",0);
        t.set("빈도",20);
        t.set(Skill.CASTING,1);
        t.set("아스키코드","E");
        Lib.add(t);

        t=Lib.extend("얼음 정령", "기본 정령");
        stats(t,40,60,50,60,15,50,4,15);
        t.set("UnarmedWeapon",Lib.create("얼음조각 공격"));
        t.set("이동속도",150);
        t.set("공격속도",150);
        t.set("시체그래픽","water pool");
        t.set("RES:ice",100);
        t.set("RES:fire",-15);
        t.set("ARM",20);
        t.set("최소레벨",24);
        t.set("이미지",425);
        t.set("DefaultThings","Ice Blast");
        Lib.add(t);
        
        t=Lib.extend("화염 정령", "기본 정령");
        stats(t,60,60,60,60,15,60,3,10);
        t.set("UnarmedWeapon",Lib.create("화염 공격"));
        t.set("이동속도",150);
        t.set("공격속도",150);
        t.set("시체그래픽","큰 불");
        t.set("RES:impact",100);
        t.set("RES:piercing",100);
        t.set("RES:ice",-15);
        t.set("RES:fire",100);
        t.set("ARM",20);
        t.set("최소레벨",22);
        t.set("이미지",407);
        t.set("DefaultThings","Blaze");
        Lib.add(t);
        
        t=Lib.extend("대지 정령", "기본 정령");
        stats(t,50,70,20,100,15,60,3,10);
        t.set("UnarmedWeapon",Lib.create("후려치기 공격"));
        t.set("이동속도",100);
        t.set("공격속도",100);
        t.set("시체그래픽","바위");
        t.set("ARM",60);
        t.set("최소레벨",21);
        t.set("이미지",405);
        t.set("DefaultThings","Blast");
        Lib.add(t);
        
        t=Lib.extend("바람 정령", "기본 정령");
        stats(t,60,60,130,40,25,70,3,10);
        t.set("이동속도",300);
        t.set("공격속도",200);
        t.set("ARM",10);
        t.set("RES:impact",100);
        t.set("RES:piercing",100);
        t.set("RES:shock",100);
        t.set("최소레벨",23);
        t.set("이미지",385);
        t.set("IsFlying",1);
        t.set("DefaultThings","Thunderbolt");
        Lib.add(t);
    }
    
    static void initUndead() {
        Thing t=Lib.extend("기본 망자", "기본 몬스터");
        t.set("IsUndead",1);
        t.set("IsLiving",0);
        t.set("이미지",302);
        t.set("시체그래픽",null);
        t.set(Skill.UNARMED,1);
        t.set("아스키코드","z");
        Lib.add(t);  
        
        initGhosts();
        initZombies();
        initSkeletons();
    }

    static void initSkeletons() {
        Thing t;
        t=Lib.extend("기본 해골", "기본 망자");
        t.set("이미지",305);
        t.set("RES:piercing",10);
        t.set("RES:fire",-5);
        t.set("ARM",2);
        t.set("공포점수",1);
        t.set("IsRegenerating",0);
        t.set("시체그래픽","50% bone");
        t.set("이동속도",100);   
        t.set("IsSkeleton",1);
        t.set("아스키코드","S");
        Lib.add(t);
        
        t=Lib.extend("하급 해골","기본 해골");
        Monster.stats(t,6,8,3,8,0,9,0,2);
        t.set("최소레벨",8);
        Lib.add(t);
        
        t=Lib.extend("해골","기본 해골");
        Monster.stats(t,10,12,8,12,0,13,0,5);
        t.set("최소레벨",11);
        t.set("DefaultThings","30% [IsWeapon]");
        Lib.add(t);
        
        t=Lib.extend("악령들린 해골","기본 해골");
        Monster.stats(t,12,12,6,10,0,13,0,5);
        t.set("최소레벨",12);
        t.set("시체그래픽","haunted skull");
        Lib.add(t);
        
        t=Lib.extend("거대한 해골","해골");
        Monster.stats(t,14,18,7,18,0,19,0,7);
        t.set("ARM",3);
        t.set("최소레벨",14);
        Lib.add(t);
        
        t=Lib.extend("공포의 해골","해골");
        Monster.stats(t,16,18,10,18,0,23,0,7);
        t.set("공포점수",2);
        t.set("ARM",3);
        t.set("최소레벨",15);
        Lib.add(t);
        
        t=Lib.extend("해골 전사","해골");
        Monster.stats(t,18,18,16,18,0,19,0,17);
        t.set("이미지",306);
        t.set("공포점수",2);
        t.set("ARM",6);
        t.set("최소레벨",16);
        t.set("DefaultThings","[IsWeapon],50% [IsArmour],30% [IsRangedWeapon]");
        Lib.add(t);
        
        t=Lib.extend("해골 영웅","해골");
        Monster.stats(t,78,58,56,78,0,99,0,27);
        t.set("이미지",306);
        t.set("공포점수",3);
        t.set("ARM",13);
        t.set("최소레벨",24);
        t.set("이동속도",150);
        t.set("공격속도",200);
        t.set("DefaultThings","[IsWeapon],[IsArmour],[IsThrowingWeapon],[IsItem]");
        Lib.add(t);
        
        t=Lib.extend("해골 군주","해골");
        Monster.stats(t,138,88,76,178,0,199,0,50);
        t.set("이미지",306);
        t.set("공포점수",4);
        t.set("ARM",20);
        t.set("최소레벨",29);
        t.set("이동속도",200);
        t.set("공격속도",250);
        t.set("DefaultThings","[IsWeapon],[IsArmour],[IsThrowingWeapon],[IsItem]");
        Lib.add(t);
        
        t=Lib.extend("해골 용","해골");
        Monster.stats(t,78,98,76,178,0,199,0,57);
        t.set("이미지",643);
        t.set("공포점수",4);
        t.set("ARM",100);
        t.set("최소레벨",28);
        t.set("이동속도",250);
        t.set("공격속도",300);
        t.set("IsFlying",1);
        t.set("시체그래픽","70% haunted dragon skull");

        Lib.add(t);
    }
    
    static void initImps() {
    	Thing t;
    	
        t=Lib.extend("기본 임프","기본 악마");
        t.set("IsImp",1);
    	t.set("ARM",2);
        Lib.add(t);
        
        t=Lib.extend("파란 임프","기본 임프");
    	Monster.stats(t,6,10,5,3,6,4,7,2);
    	t.set("이미지",347);
    	t.set("최소레벨",7);
    	t.set("시체그래픽","Frost Bolt");
    	Lib.add(t);
    	
        t=Lib.extend("고드름 임프","기본 임프");
    	Monster.stats(t,4,4,5,3,5,5,7,2);
    	t.set("이미지",347);
    	t.set("최소레벨",8);
    	t.set(Skill.CASTING,1);
    	t.set("DefaultThings","Frost Bolt");
    	t.set("ARM",3);
    	t.set("시체그래픽","Frost Bolt");
    	Lib.add(t);
          	
        t=Lib.extend("화염 임프","기본 임프");
    	Monster.stats(t,7,7,3,3,7,8,7,2);
    	t.set("이미지",220);
    	t.set("IsFlying",1);
    	t.set("최소레벨",9);
    	t.set("RES:fire",1000);
    	t.set("RES:ice",-30);
    	t.set(Skill.CASTING,1);
    	t.set("DefaultThings","Flame");
    	t.set("ARM",4);
    	t.set("시체그래픽","Flame");
    	Lib.add(t);
    	
        
        t=Lib.extend("상급 푸른 임프","파란 임프");
    	Monster.stats(t,16,16,15,16,6,14,7,2);
    	t.set("이미지",347);
    	t.set("최소레벨",11);
    	t.set("시체그래픽","Frost Bolt,[IsRunestone]");
    	Lib.add(t);
    	
        t=Lib.extend("상급 화염 임프","화염 임프");
    	Monster.stats(t,17,17,13,13,17,18,17,12);
    	t.set("이미지",220);
    	t.set("IsFlying",1);
    	t.set("최소레벨",12);
    	t.set("RES:fire",1000);
    	t.set("RES:ice",-30);
    	t.set(Skill.CASTING,2);
    	t.set(Skill.FOCUS,2);
    	t.set("DefaultThings","Flame, Fireball");
    	t.set("ARM",8);
    	t.set("시체그래픽","Fireball,[IsRunestone]");
    	Lib.add(t);
    }
    
    static void initDemons() {
    	Thing t;
    	
        t=Lib.extend("기본 악마", "기본 몬스터");
        t.set("IsLiving",0);
        t.set("IsDemonic",1);
        t.set("RES:fire",10);
        t.set("RES:acid",10);
        t.set("아스키코드","D");
        t.multiplyStat(RPG.ST_REGENERATE,3);
        t.set("UnarmedWeapon",Lib.create("손톱 공격"));
        Lib.add(t);
        
    	t=Lib.extend("하급 악마","기본 악마");
    	Monster.stats(t,20,20,20,20,20,20,20,20);
        t.set(Skill.UNARMED,2);
        t.set(Skill.DEFENCE,2);
        t.set(Skill.ATTACK,2);
    	t.set("이미지",420);
        t.set("최소레벨",14);
    	Lib.add(t);
    	
    	t=Lib.extend("암흑 천사","하급 악마");
    	Monster.stats(t,30,20,40,20,40,30,60,20);
    	t.set("이미지",400);
    	t.set("IsFlying",1);
    	t.set("최소레벨",16);
    	t.set("ARM",10);
    	Lib.add(t);
    	
    	t=Lib.extend("무저갱의 짐승","하급 악마");
    	Monster.stats(t,40,40,50,40,10,60,10,20);
    	t.set("이미지",420);
    	t.set("최소레벨",21);
    	t.set("ARM",18);
    	t.set("공격속도",200);
    	Lib.add(t);
    	
    	t=Lib.extend("담즙 악마","하급 악마");
    	Monster.stats(t,40,40,30,70,50,60,1,40);
    	t.set("이미지",545);
    	t.set("최소레벨",24);
    	t.set("ARM",60);
    	t.set("공격속도",150);
    	t.set(Skill.CASTING,2);
    	t.set(Skill.FOCUS,1);
        t.set("UnarmedWeapon",Lib.create("맹독 공격"));
    	t.set("DefaultThings","Aruk's Poison Cloud,[IsSpell]");
        Lib.add(t);
		
    	t=Lib.extend("말벌 악마","하급 악마");
    	Monster.stats(t,60,40,70,40,10,70,5,30);
    	t.set("이미지",548);
    	t.set("최소레벨",25);
    	t.set("ARM",20);
		t.set("이동속도",200);
    	t.set("공격속도",200);
        t.set("UnarmedWeapon",Lib.create("맹독 공격"));
    	Lib.add(t);
		
        
    	t=Lib.extend("영혼의 탐식자","하급 악마");
    	Monster.stats(t,70,80,80,140,160,190,100,140);
    	t.set("이미지",543);
    	t.set("최소레벨",27);
    	t.set("ARM",60);
    	t.set("공격속도",150);
    	t.set("이동속도",70);
    	t.set(Skill.CASTING,2);
    	t.set(Skill.FOCUS,3);
    	t.set("행운",60);
        t.set("UnarmedWeapon",Lib.create("정기흡수 공격"));
    	t.set("DefaultThings","Thunderbolt,Blaze,[IsSpell],[IsSpell]");
        Lib.add(t);
    	
    	t=Lib.extend("상급 악마","하급 악마");
    	Monster.stats(t,150,100,100,150,100,200,50,100);
    	t.set("ARM",70);
    	t.set("공격속도",200);
    	t.set("이동속도",200);
    	t.set("IsFlying",1);
    	t.set(Skill.CASTING,2);
    	t.set("이미지",541);
        t.set("행운",130);
    	t.set("최소레벨",30);
    	Lib.add(t);
		
    	t=Lib.extend("뇌운의 악마","상급 악마");
    	Monster.stats(t,150,100,100,150,100,200,50,100);
    	t.set("ARM",40);
    	t.set("공격속도",150);
    	t.set("이동속도",150);
    	t.set("IsFlying",0);
    	t.set(Skill.CASTING,4);
    	t.set("이미지",542);
        t.set("행운",140);
    	t.set("DefaultThings","Thunderbolt,Blaze,[IsSpell],[IsSpell]");
    	t.set("최소레벨",36);
    	Lib.add(t);
    	
    	t=Lib.extend("상급 화염 악마","상급 악마");
    	Monster.stats(t,150,150,150,200,100,250,50,50);
    	t.set("ARM",100);
    	t.set("RES:fire",1000);
    	t.set("RES:ice",-20);
    	t.set("RES:water",-20);
    	t.set("이미지",544);
    	t.set("최소레벨",33);
        t.addHandler("OnAction",breathAttack("불","blazing flames",3,40,1));
    	Lib.add(t);
    	
    	t=Lib.extend("상급 고드름 악마","상급 악마");
    	Monster.stats(t,160,120,150,150,150,250,50,50);
    	t.set("ARM",60);
    	t.set("RES:fire",-10);
    	t.set("RES:ice",1000);
    	t.set("RES:water",20);
    	t.set("이미지",546);
    	t.set("최소레벨",34);
    	t.set("UnarmedWeapon",Lib.create("얼음조각 공격"));
        t.addHandler("OnAction",breathAttack("얼음","a blast of ice",3,40,101));
    	Lib.add(t);

    	
    	t=Lib.extend("바알-루크","상급 악마");
    	Monster.stats(t,400,500,500,400,200,600,100,200);
    	t.set("이미지",540);
    	t.set("ARM",200);
    	t.set("RES:fire",1000);
    	t.set("RES:ice",-20);
    	t.set("RES:water",-20);
    	t.set("공격속도",300);
    	t.set("이동속도",400);
    	t.set("IsFlying",1);
    	t.set(Skill.CASTING,5);
        t.set("UnarmedWeapon",Lib.create("손톱 공격"));
        t.set("DefaultThings","[IsSword],Firepath,Blaze,[IsSpell]");
        t.set("행운",130);
    	t.set("최소레벨",39);
    	Lib.add(t);
    }
    
    
    static void initZombies() {
        Thing t;
        t=Lib.extend("기본 좀비", "기본 망자");
        t.set("이미지",300);
        t.set("RES:piercing",7);
        t.set("RES:fire",-10);
        t.set("ARM",1);
        t.set("공포점수",1);
        t.set("IsRegenerating",0);
        t.set("시체그래픽","뼈");
        t.set("이동속도",65);
        t.set("아스키코드","z");
        Lib.add(t);
        
        t=Lib.extend("하급 좀비","기본 좀비");
        Monster.stats(t,3,7,4,3,0,5,0,0);
        t.set("최소레벨",5);
        Lib.add(t);
        
        t=Lib.extend("좀비","기본 좀비");
        Monster.stats(t,9,17,6,7,0,14,0,0);
        t.set("최소레벨",8);
        Lib.add(t);
        
        t=Lib.extend("공포의 좀비","기본 좀비");
        Monster.stats(t,9,20,6,16,0,14,0,0);
        t.set("최소레벨",9);
        t.set("공포점수",2);
        t.set("공격속도",150);
        Lib.add(t);
        
        t=Lib.extend("대형 좀비","기본 좀비");
        Monster.stats(t,12,26,8,36,0,20,0,0);
        t.set("최소레벨",10);
        t.set("이미지",301);
        Lib.add(t);
        
        t=Lib.extend("무시무시한 좀비","기본 좀비");
        Monster.stats(t,12,20,6,20,0,20,0,0);
        t.set("최소레벨",11);
        t.set("공포점수",3);
        t.set("이미지",301);
        Lib.add(t);
    }
    
    static void initGhosts() {
        Thing t;
        t=Lib.extend("기본 유령", "기본 망자");
        t.set("IsUndead",1);
        t.set("IsEthereal",1);
        t.set("IsFlying",1);
        t.set("IsInhabitant",1); // probably an old relative!
        t.set("IsBlocking",1);
        t.set("IsGhost",1);
        t.set("공포점수",2);
        t.set("이미지",310);
        t.set("RES:ice",20);
        t.set("RES:acid",20);
        t.set("이동속도",80); // bit slow
        t.set("UnarmedWeapon",Lib.create("냉기 공격"));
        t.set("아스키코드","G");
        Lib.add(t);
        
        t=Lib.extend("유령", "기본 유령");
        stats(t,30,30,40,10,20,20,0,0);
        t.set("이미지",310);
        t.set("최소레벨",17);
        t.set("OnTouch",Scripts.damage("냉기",3,"chilled by the touch of the ghost",50));
        Lib.add(t);
        
        t=Lib.extend("성령", "유령");
        stats(t,40,30,40,30,20,20,0,0);
        t.set("이미지",310);
        t.set("최소레벨",22);
        t.addHandler("OnAction",Scripts.generator("유령",20));
        Lib.add(t);    
        
        t=Lib.extend("원령", "기본 유령");
        stats(t,80,80,60,50,60,120,0,0);
        t.set("이미지",315);
        t.set("최소레벨",24);
        t.set("공격속도",150);
        t.set("공포점수",5);
        t.set("IsViewBlocking",1);
        t.addHandler("OnAction",Scripts.generator("원령",40));
        t.set("OnTouch",Scripts.damage("냉기",10,"chilled by the touch of the spectre",50));
        Lib.add(t);    
        
        t=Lib.extend("사악한 원령", "원령");
        stats(t,100,100,80,90,60,150,0,0);
        t.set("이미지",315);
        t.set("최소레벨",30);
        t.set("공격속도",200);
        t.set("공포점수",6);
        t.addHandler("OnAction",Scripts.generator("원령",100));
        Lib.add(t);  
        
        t=Lib.extend("원령 군주", "사악한 원령");
        stats(t,130,160,80,170,90,200,0,0);
        t.set("이미지",315);
        t.set("최소레벨",34);
        t.set("공격속도",300);
        t.set("공포점수",7);
        Lib.add(t);
        
    }
    
    static void initGoblinoids() {
        Thing t;
        
        t=Lib.extend("기본 고블리노이드", "기본 휴머노이드");
        t.set("IsGoblinoid",1);
        t.set("이미지",240);
        t.set("ARM",1);
        t.set(Skill.UNARMED,1);
        t.set("OnChat",new Personality(Personality.CHATTER,Personality.CHATTER_GOBLIN));
        Lib.add(t);
        
        t=Lib.extend("고블린", "기본 고블리노이드");
        stats(t,10,8,12,7,6,5,5,5);
        t.set("시체그래픽", "slime pool, 20% 금화");
        t.set("최소레벨",4);
        t.set("최대레벨",15);
        t.set("이미지",244);
        t.set("IsGoblin",1);
        t.set("DefaultThings","30%[IsWeapon],15%[IsFood]");
        Lib.add(t);
        
        t=Lib.extend("비리비리한 고블린", "기본 고블리노이드");
        stats(t,5,3,12,3,5,2,5,5);
        t.set("시체그래픽", "slime pool");
        t.set("최소레벨",2);
        t.set("최대레벨",8);
        t.set("이미지",244);
        t.set("DefaultThings","10%[IsWeapon]");
        Lib.add(t);
        
        t=Lib.extend("작은 고블린", "기본 고블리노이드");
        stats(t,6,6,10,4,5,2,5,5);
        t.set("시체그래픽", "slime pool");
        t.set("최소레벨",3);
        t.set("최대레벨",12);
        t.set("이미지",244);
        t.set("DefaultThings","20%[IsWeapon]");
        Lib.add(t);
		
        t=Lib.extend("고블린 투석꾼", "기본 고블리노이드");
        stats(t,6,6,10,4,5,2,5,5);
        t.set("시체그래픽", "slime pool");
        t.set("최소레벨",4);
        t.set("이미지",244);
		t.set("RetreatChance",50);
        t.set(Skill.THROWING,RPG.d(2));
        t.set("DefaultThings","10 [IsRock]");
        Lib.add(t);
		
        t=Lib.extend("고블린 슬링투척꾼", "고블린");
        stats(t,10,10,6,10,4,5,4,5);
        t.set("이미지",244);
        t.set("최소레벨",5);
		t.set("RetreatChance",40);
        t.set(Skill.ARCHERY,RPG.d(2));
        t.set("DefaultThings","[IsSling], 20 stone");
        Lib.add(t);
        
        t=Lib.extend("고블린 궁수", "고블린");
        stats(t,10,10,6,13,4,9,4,7);
        t.set("이미지",248);
        t.set("최소레벨",7);
		t.set("RetreatChance",60);
        t.set(Skill.ARCHERY,RPG.d(2));
        t.set("DefaultThings","100%[IsBow], 100% 6 [IsArrow],60% 6 goblin arrow");
        Lib.add(t);
        
        t=Lib.extend("커다란 고블린", "고블린");
        stats(t,10,10,6,13,4,9,4,7);
        t.set("최소레벨",6);
        t.set("이미지",241);
        t.set(Skill.UNARMED,2);
        t.set("ARM",3);
        Lib.add(t);
        
        t=Lib.extend("고블린 전사", "커다란 고블린");
        stats(t,13,10,11,9,6,8,5,6);
        t.set("이미지",240);
        t.set("DefaultThings","30% [IsArmour], 30%[IsWeapon]");
        t.set("최소레벨",8);
        t.set("ARM",6);
        Lib.add(t);
        
        t=Lib.extend("고블린 지휘자", "고블린 전사");
        stats(t,23,12,19,17,6,8,5,6);
        t.set("이미지",243);
        t.set("DefaultThings","50% [IsArmour], [IsWeapon]");
        t.set("최소레벨",10);
        t.set(Skill.DEFENCE,2);
        t.incStat(RPG.ST_SKILLPOINTS,2);
        t.set("ARM",10);
        Lib.add(t);
        
        t=Lib.extend("고블린 용자", "고블린 지휘자");
        stats(t,33,22,39,27,16,18,11,16);
        t.set(Skill.ATTACK,1);
        t.set("ARM",15);
        t.set("최소레벨",14);
        t.incStat("행운",20);
        Lib.add(t);
        
        t=Lib.extend("고블린 족장", "고블린 용자");
        stats(t,35,32,39,47,16,28,11,16);
        t.set(Skill.ATTACK,1);
        t.set(Skill.DEFENCE,1);
        t.set("ARM",18);
        t.set("최소레벨",17);
        t.incStat("행운",30);
        Lib.add(t);
        
        t=Lib.extend("고블린 영웅", "고블린 족장");
        stats(t,53,32,69,47,36,48,21,36);
        t.set("이동속도",160);
        t.set("공격속도",160);
        t.set(Skill.ATTACK,2);
        t.incStat(RPG.ST_SKILLPOINTS,4);
        t.set("DefaultThings","[IsArmour], [IsWeapon], 20% [IsThrowingWeapon], 20% [IsRangedWeapon]");
        t.set("ARM",20);
        t.set("최소레벨",20);
        t.incStat("행운",40);
        Lib.add(t);
        
		t=Lib.extend("고블린 전투대장","고블린 영웅");
		Monster.strengthen(t,2);
		t.set("최소레벨",26);
		t.set("IsDisplaceable",0);
		Lib.add(t);
        
        t=Lib.extend("비행 고블린", "고블린");
        stats(t,18,10,16,19,26,28,15,16);
        t.set("이미지",247);
        t.set("이동속도",350);
        t.set("공격속도",200);
        t.set("IsFlying",1);
        t.set("DefaultThings","50% [IsArmour], 100%[IsWeapon]");
        t.set("빈도",10);
        t.set("최소레벨",13);
        Lib.add(t);
        
        t=Lib.extend("고블린 주술사", "고블린");
        stats(t,16,10,16,13,26,28,15,16);
        t.set("UnarmedWeapon",Lib.create("저주내림 공격"));
        t.set(Skill.CASTING,3);
        t.set(Skill.DEFENCE,2);
        t.set(Skill.FOCUS,2);
        t.set("DefaultThings","[IsStaff],50% Fireball,50% Poison Cloud,50% Flame,[IsSpell],50% [IsArmour],[IsScroll]");
        t.set("이미지",245);
        t.set("최소레벨",17);
        t.set("ARM",15);
        t.incStat("행운",50);
        Lib.add(t);
        
        t=Lib.extend("오크", "커다란 고블린");
        stats(t,8,10,7,11,4,9,3,3);
        t.set("ARM",4);
        t.set("최소레벨",8);
        t.set(Skill.ATTACK,1);
        t.set("이미지",242);
        t.set("IsOrc",1);
        t.set("OnChat",new Personality(Personality.CHATTER,Personality.CHATTER_ORC));
        Lib.add(t);
        
        t=Lib.extend("커다란 오크", "오크");
        stats(t,7,14,7,16,4,9,3,3);
        t.set("ARM",6);
        t.set("최소레벨",10);
        t.set(Skill.UNARMED,2);
        t.set(Skill.ATTACK,1);
        t.set(Skill.DEFENCE,2);
        t.set("이미지",242);
        Lib.add(t);
        
        t=Lib.extend("오크 전사", "오크");
        stats(t,13,18,9,18,5,18,5,6);
        t.set("ARM",10);
        t.set(Skill.ATTACK,2);
        t.set(Skill.DEFENCE,1);
        t.set("이미지",246);
        t.set("DefaultThings","50% [IsArmour], 100%[IsWeapon]");
        t.set("최소레벨",13);
        Lib.add(t);
        
        t=Lib.extend("오크 용자", "오크");
        Monster.strengthen(t,2.5);
        t.set(Skill.UNARMED,3);
        t.set(Skill.ATTACK,2);
        t.set(Skill.DEFENCE,3);
        t.set("공격속도",160);
        t.set("이미지",246);
        t.set("DefaultThings","[IsArmour],[IsWeapon]");
        t.set("최소레벨",16);
        t.incStat("행운",20);
        Lib.add(t);
        
        t=Lib.extend("오크 영웅", "오크");
        Monster.strengthen(t,6.0);
        t.set(Skill.UNARMED,4);
        t.set(Skill.ATTACK,4);
        t.set(Skill.DEFENCE,5);
        t.set("공격속도",200);
        t.set("이동속도",130);
        t.set("이미지",246);
        t.incStat(RPG.ST_SKILLPOINTS,4);
        t.set("DefaultThings","[IsArmour],[IsWeapon], 50% [IsThrowingWeapon]");
        t.set("최소레벨",22);
        t.incStat("행운",40);
        Lib.add(t);
        
        t=Lib.extend("오크 대족장", "오크 영웅");
        Monster.strengthen(t,2.0);
        t.set(Skill.UNARMED,6);
        t.set(Skill.ATTACK,6);
        t.set(Skill.DEFENCE,8);
        t.set("공격속도",300);
        t.set("이동속도",150);
        t.set("이미지",246);
        t.set("DefaultThings","[IsArmour],[IsArmour],[IsWeapon],[IsThrowingWeapon],[IsItem]");
        t.set("최소레벨",28);
        t.incStat("행운",60);
        Lib.add(t);
    }
    
    static void initInsects() {
    	// insects are small and DON'T block
    	
        Thing t;
        t=Lib.extend("기본 곤충", "기본 몬스터");
        t.set("시체그래픽", "slime pool");
        t.set("IsInsect",1);
        t.set("IsBeast",1);
        t.set("IsBlocking",1);
        t.set("빈도",40);
        t.set("RES:poison",10);
        t.set("최소레벨",3);
        t.incStat(Skill.DODGE,1); // dodgy little pests!
        Lib.add(t);
        
        // simple insect
        t=Lib.extend("곤충", "기본 곤충");
        stats(t,2,2,3,1,1,1,1,1);
        t.set("이미지",161);
        t.set("최소레벨",1);
        Lib.add(t);
        
        // bugs
        t=Lib.extend("작은 노린재", "곤충");
        stats(t,3,3,1,2,1,1,1,2);
        t.set("이미지",162);
        t.set("최소레벨",1);
        t.set("시체그래픽", "20% squished bug");
        Lib.add(t);
        
        t=Lib.extend("바퀴벌레", "곤충");
        stats(t,2,2,5,2,1,2,0,1);
        t.set("이미지",161);
        t.set("최소레벨",2);
        t.set("시체그래픽", "30% squished roach");
        Lib.add(t);

        t=Lib.extend("딱정벌레", "곤충");
        stats(t,5,3,5,4,2,3,1,2);
        t.set("이미지",169);
        t.set("최소레벨",3);
        t.set("시체그래픽", "30% dead beetle");
        Lib.add(t);
        
        t=Lib.extend("벌레", "곤충");
        stats(t,8,8,8,8,2,9,1,2);
        t.set("이미지",161);
        t.set("ARM",3);
        t.set("최소레벨",4);
        t.set("시체그래픽", "30% dead bug");
        Lib.add(t);
        
        t=Lib.extend("노린재", "곤충");
        stats(t,9,8,8,8,2,9,1,2);
        t.set("이미지",162);
        t.set("ARM",4);
        t.set("최소레벨",5);
        t.set("시체그래픽", "40% dead bug");
        Lib.add(t);
        
        t=Lib.extend("커다란 벌레", "벌레");
        stats(t,14,12,6,13,3,19,1,3);
        t.set("이미지",181);
        t.set("ARM",3);
        t.set("최소레벨",6);
        t.set("시체그래픽", "40% dead bug");
        Lib.add(t);
        
        t=Lib.extend("거대 바퀴벌레", "곤충");
        stats(t,13,10,18,13,2,5,0,2);
        t.set("이미지",161);
        t.set(Skill.DEFENCE,1);
        t.set("ARM",5);
        t.set("최소레벨",7);
        t.set("시체그래픽", "40% dead roach");
        Lib.add(t);
        
        t=Lib.extend("얼음벌레", "벌레");
        stats(t,14,13,6,12,3,19,1,3);
        t.set("이미지",181);
        t.set("최소레벨",8);
        t.set("ARM",2);
        t.set("UnarmedWeapon",Lib.create("얼음조각 공격"));
        // no corpse -- they melt
        Lib.add(t);
        
        t=Lib.extend("암흑딱정벌레","곤충");
        stats(t,13,16,18,18,2,15,0,2);
        t.set("이미지",191);
        t.set(Skill.DEFENCE,2);
        t.set(Skill.ATTACK,2);
        t.set("ARM",18);
        t.set("최소레벨",12);
        t.set("시체그래픽", "40% dead beetle");        
        Lib.add(t);

        // scorpions
        // vulnerable but v. nasty attacks!
        t=Lib.extend("전갈", "곤충");
        stats(t,40,18,20,10,2,29,1,6);
        t.set("이미지",168);
        t.set("최소레벨",10);
        t.set("ARM",2);
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        t.set("시체그래픽", "slime pool, scorpion tail, 20% dead scorpion");
        Lib.add(t);    
        
        // insect swarms
        t=Lib.extend("기본 벌레떼", "기본 곤충");
        stats(t,1,1,1,1,1,1,1,1);
        t.set("이미지",281);
        t.set("IsFlying",1);
        t.set("최소레벨",1);
        t.set("ARM",0);
        t.set("IsConfused",1);
        t.incStat(Skill.DODGE,1);
        Lib.add(t);
        
        t=Lib.extend("파리떼", "기본 벌레떼");
        stats(t,6,4,7,3,1,3,1,1);
        t.set("이미지",280);
        t.set("최소레벨",3);
        t.set("시체그래픽", "20* dead fly");
        Lib.add(t);
        
        t=Lib.extend("꿀벌 떼", "기본 벌레떼");
        stats(t,12,6,13,5,1,3,1,1);
        t.set("이미지",281);
        t.set("최소레벨",5);
        t.set("시체그래픽", "30* dead bee");
        Lib.add(t);
        
        t=Lib.extend("말벌떼", "기본 벌레떼");
        stats(t,20,8,16,10,1,3,1,1);
        t.set("이미지",282);
        t.set("ARM",1);
        t.set("최소레벨",7);
        t.set("시체그래픽", "10* dead wasp");
        Lib.add(t);
        
        t=Lib.extend("호박벌 떼", "기본 벌레떼");
        stats(t,28,18,26,20,1,3,1,1);
        t.set("이미지",282);
        t.set("ARM",3);
        t.set("최소레벨",11);
        t.set("시체그래픽", "15* dead hornet");
        Lib.add(t);
        
        t=Lib.extend("쌍살벌 떼", "기본 벌레떼");
        stats(t,25,8,16,15,1,3,1,1);
        t.set("이미지",289);
        t.set("최소레벨",9);
        t.set("ARM",2);
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        t.set("시체그래픽", "20* dead fire wasp");
        Lib.add(t);
    }
    
    
    static void initBears() {
    	Thing t;
    	
    	t=Lib.extend("기본 곰","기본 몬스터");
       	t.set("IsBear",1);
       	t.set("IsBeast",1);
    	t.set("이동속도",100);
    	t.set("공격속도",150);
    	t.set("빈도",10);
    	t.set("이미지",201);
    	t.set("ARM",8);
        t.set("시체그래픽","blood pool, 30% bear paw");
        t.set("UnarmedWeapon",Lib.create("손톱 공격"));
    	Lib.add(t);
    	
    	t=Lib.extend("갈색 곰","기본 곰");
    	Monster.stats(t,20,25,16,35,3,15,4,3);
    	t.set("최소레벨",12);
    	t.set("이미지",201);
    	Lib.add(t);
    	
    	t=Lib.extend("불곰","기본 곰");
    	Monster.stats(t,25,35,19,45,3,25,4,3);
    	t.set("최소레벨",15);
    	t.set("이미지",201);
    	Lib.add(t);
    	
    	t=Lib.extend("검은 곰","기본 곰");
    	Monster.stats(t,30,50,25,65,3,35,4,3);
    	t.set("최소레벨",16);
    	t.set("이미지",203);
    	Lib.add(t);
    	
    	t=Lib.extend("북극곰","기본 곰");
    	Monster.stats(t,35,55,29,75,3,45,4,3);
    	t.set("최소레벨",18);
    	t.set("이미지",202);
    	Lib.add(t);
    	
    	t=Lib.extend("얼음 곰","기본 곰");
    	Monster.stats(t,35,55,29,75,3,55,4,3);
    	t.set("최소레벨",20);
    	t.set("이미지",202);
        t.set("UnarmedWeapon",Lib.create("얼음조각 공격"));

    	Lib.add(t);
    }
    
    static void initCats() {
    	Thing t;
    	
    	t=Lib.extend("기본 고양이","기본 몬스터");
    	t.set("IsFeline",1);
    	t.set("이동속도",120);
    	t.set("빈도",10);
    	t.set("이미지",213);
        t.set("시체그래픽","blood pool, 30% cat whisker");
        t.set("아스키코드","f");
        t.set("IsBeast",1);
    	Lib.add(t);
    	
    	t=Lib.extend("검은 고양이","기본 고양이");
    	Monster.stats(t,10,3,16,5,3,5,4,2);
    	t.set("최소레벨",3);
    	t.set("이미지",213);
    	Lib.add(t);

    	t=Lib.extend("살쾡이","검은 고양이");
    	Monster.stats(t,20,13,26,20,3,13,3,3);
    	t.set("최소레벨",8);
    	t.set("이미지",211);
    	Lib.add(t);

    	t=Lib.extend("치타","살쾡이");
    	Monster.stats(t,30,23,36,20,3,13,3,3);
    	t.set("최소레벨",11);
    	t.set("이동속도",200);
    	t.set("공격속도",200);
    	t.set("이미지",211);
    	Lib.add(t);

    	t=Lib.extend("동굴 사자","살쾡이");
    	Monster.stats(t,40,40,36,40,4,23,9,2);
    	t.set("최소레벨",14);
        t.set("UnarmedWeapon",Lib.create("날카로운 손톱 공격"));
    	t.set("이미지",212);
    	Lib.add(t);

    	t=Lib.extend("마녀의 고양이","검은 고양이");
    	Monster.stats(t,28,13,36,15,10,19,13,7);
    	t.set("최소레벨",17);
        t.set("UnarmedWeapon",Lib.create("불운저주 공격"));
        t.set("운명점수",9);
        t.set("행운",100);
    	t.set("이미지",213);
    	Lib.add(t); 
    	
    	
    }
    
    static void initPlants() {
    	Thing t=Lib.extend("기본 식물 몬스터","기본 몬스터");
    	t.set("IsPlantMonster",1);
    	t.set("이미지",320);
    	t.set("이동속도",30);
    	t.set("RES:fire",-15);
    	t.set("RES:impact",12);
    	t.set("RES:piercing",12);
    	t.set("RES:poison",1000);
    	t.set("아스키코드","t");
    	Lib.add(t);
    	
    	t=Lib.extend("트리피드","기본 식물 몬스터");
    	t.set("이미지",320);
    	Monster.stats(t,10,10,10,15,0,10,0,3);
        t.set("UnarmedWeapon",Lib.create("눈멀기 공격"));
        t.set("ARM",3);
        t.set("최소레벨",10);
        t.set("시체그래픽","slime pool");
        Lib.add(t);

    	t=Lib.extend("씨앗 트리피드","트리피드");
    	t.set("이미지",322);
    	Monster.stats(t,20,10,20,30,0,30,0,6);
        t.set("UnarmedWeapon",Lib.create("눈멀기 공격"));
        t.addHandler("OnAction",Scripts.generator("트리피드",100));
        t.set("최소레벨",14);
    	Lib.add(t);
        
        t=Lib.extend("나무 괴물","기본 식물 몬스터");
    	Monster.stats(t,20,40,10,80,4,40,0,2);
    	t.set("ARM",20);
    	t.set("IsIntelligent",1);
        t.set("이미지",321);
        t.set("최소레벨",10);
        t.set("시체그래픽","통나무");
        t.set("아스키코드","T");
        Lib.add(t);
        
        t=Lib.extend("바위투척꾼 나무 괴물","나무 괴물");
    	Monster.stats(t,30,50,10,80,4,40,0,2);
    	t.set("ARM",30);
        t.set("이미지",321);
        t.set("최소레벨",13);
        t.set("DefaultThings","10 rock");
        t.set(Skill.THROWING,3);
        t.set("시체그래픽","통나무");
        Lib.add(t);
        
        t=Lib.extend("거대한 나무 괴물","나무 괴물");
    	Monster.stats(t,40,60,12,180,19,70,6,7);
    	t.set("ARM",50);
        t.set("이미지",321);
        t.set("최소레벨",18);
        t.set("시체그래픽","통나무");
        Lib.add(t);
        
        t=Lib.extend("버섯인간","기본 식물 몬스터");
    	Monster.stats(t,40,60,20,100,39,70,6,27);
    	t.set("ARM",80);
        t.set("이미지",325);
    	t.set("이동속도",60);
    	t.incStat(Skill.CASTING,1);
    	t.set("DefaultThings","Aruk's Poison Cloud");
        t.set("최소레벨",22);
        t.set("시체그래픽","Poison Cloud,[IsMushroom]");
        Lib.add(t);
        
        t=Lib.extend("독넝쿨","기본 식물 몬스터");
    	Monster.stats(t,80,100,0,120,1,50,0,3);
    	t.set("ARM",120);
        t.set("이미지",323);
    	t.set("이동속도",10);
    	t.set("공격속도",100);
        t.set("최소레벨",24);
        t.set("시체그래픽","Poison Cloud,slime pool");
        t.set("UnarmedWeapon",Lib.create("독채찍 공격"));
        Lib.add(t);
    }
    
    static void initBirds() {
        // Little critters
        // low level, quite common
        Thing t;
        
        t=Lib.extend("기본 조류", "기본 몬스터");
        t.set("IsBird",1);
        t.set("IsBeast",1);
        t.set("빈도",45);
        t.set("IsFlying",1);
        t.set("이동속도",200);
        t.set("이미지",291);
        t.set("RES:shock",20);
        t.set("RES:fire",-5);
        Lib.add(t);
        
        t=Lib.extend("황조롱이", "기본 조류");
        t.set("최소레벨",3);
        t.set("시체그래픽","blood pool,40% kestrel feather");
        stats(t,7,4,18,3,1,3,5,2);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        Lib.add(t);
        
        t=Lib.extend("매", "기본 조류");
        t.set("최소레벨",7);
        t.set("시체그래픽","blood pool,40% hawk feather");
        stats(t,16,10,28,13,2,6,7,3);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        Lib.add(t);
        
        t=Lib.extend("독수리", "매");
        t.set("최소레벨",11);
        t.set("ARM",3);
        t.set("시체그래픽","blood pool,40% hawk feather");
        stats(t,26,15,38,18,6,16,27,3);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        Lib.add(t);
    }
    
    /* 
     * Dragons are fast, tough and deadly
     * 
     * 
     */
    static void initDragons() {
    	Thing t;
    	
    	t=Lib.extend("기본 드래곤","기본 몬스터");
        t.set("IsBeast",1);
        t.set("IsDragon",1);
        t.set("IsReptile",1);
        t.set("IsViewBlocking",1);
        t.set("빈도",20);
        stats(t,120,140,100,200,250,190,200,240);
        t.set("ARM",300);
        t.set("공격속도",200);
        t.set("RES:poison",20);
        t.set("RES:fire",10);
        t.set("이동속도",200);
        t.set("행운",70);
        t.set("IsFlying",1);
        t.set(Skill.UNARMED,3);
        t.set(Skill.ATTACK,3);
        t.set(Skill.DEFENCE,4);
        t.set(Skill.BRAVERY,2);
        t.set(Skill.CASTING,2);
        t.set(Skill.FOCUS,3);
        t.set("UnarmedWeapon",Lib.create("날카로운 손톱 공격"));
        t.set("최소레벨",30);
        t.set("이미지",645);
        Lib.add(t);
        
        t=Lib.extend("늪지 드래곤","기본 드래곤");
        Monster.strengthen(t,0.8);
        t.set("RES:poison",1000);
        t.set("최소레벨",29);
        t.set("이미지",645);
        t.addHandler("OnAction",breathAttack("독","noxious fumes",2,40,41));
        Lib.add(t);
        
        t=Lib.extend("녹색 드래곤","기본 드래곤");
        Monster.strengthen(t,1.0);
        t.set("최소레벨",30);
        t.set("이미지",647);
        t.addHandler("OnAction",breathAttack("독","poisonous fumes",2,60,41));
        t.addHandler("OnAction",breathAttack("불","blazing flames",2,60,1));
        Lib.add(t);
        
        t=Lib.extend("청색 드래곤","기본 드래곤");
        t.set("RES:shock",1000);
        t.set("최소레벨",31);
        t.set("이미지",644);
        t.addHandler("OnAction",breathAttack("얼음","crackling lightning",3,60,61));
        Lib.add(t);
        
        t=Lib.extend("고드름 드래곤","기본 드래곤");
        t.set("RES:ice",1000);
        t.set("RES:fire",-15);
        t.set("최소레벨",32);
        t.addHandler("OnAction",breathAttack("얼음","a blast of ice",5,60,101));

        t.set("이미지",640);
        Lib.add(t);
        
        t=Lib.extend("적색 드래곤","기본 드래곤");
        Monster.strengthen(t,1.5);
        t.set("RES:fire",1000);
        t.set("RES:ice",-15);
        t.set("최소레벨",34);
        t.set("이미지",641);
        t.addHandler("OnAction",breathAttack("불","hellish flames",6,100,1));
        Lib.add(t);

        
        t=Lib.extend("흑색 드래곤","기본 드래곤");
        Monster.strengthen(t,1.5);
        t.set("RES:ice",1000);
        t.set("RES:fire",-15);
        t.set("최소레벨",36);
        t.set("이미지",642);
        t.set("행운",100);
        t.set(Skill.CASTING,6);
        t.set(Skill.FOCUS,5);
        t.addHandler("OnAction",breathAttack("불","hellish flames",4,60,1));
        t.set("DefaultThings","[IsSpell],[IsSpell],[IsSpell],[IsSpell],[IsSpell],[IsSpell],[IsSpell]");
        Lib.add(t);
        

        
    	
    }
	
    static void initCentipedes() {
        Thing t;
        
        t=Lib.extend("기본 지네", "기본 몬스터");
        t.set("IsCentipede",1);
		t.set("IsInsect",1);
        t.set("IsBeast",1);
        t.set("빈도",40);
        stats(t,7,5,5,7,2,6,1,1);
        t.set("이동속도",100);
        t.set("이미지",560);
		t.set("ARM",2);
        t.set("RES:poison",20);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        Lib.add(t);
		
		t=Lib.extend("지네", "기본 지네");
		t.set("최소레벨",2);
		Lib.add(t);
		
		t=Lib.extend("대형 지네", "기본 지네");
		Monster.strengthen(t,1.5);
		t.set("최소레벨",4);
		Lib.add(t);
		
		t=Lib.extend("괴물 지네", "기본 지네");
		Monster.strengthen(t,2);
		t.set("이미지",565);
		t.set("최소레벨",7);
		Lib.add(t);
		
		t=Lib.extend("악마 지네", "기본 지네");
		Monster.strengthen(t,3);
		t.set("이미지",563);
		t.set("최소레벨",10);
		Lib.add(t);
		
		t=Lib.extend("마법 지네", "기본 지네");
		Monster.strengthen(t,3);
		stats(t,10,8,15,17,25,28,4,12);
		t.set("이미지",561);
		t.set(Skill.CASTING,2);
		t.set("DefaultThings","[IsSpell],[IsSpell],[IsSpell]");
		t.set("최소레벨",13);
		Lib.add(t);
    }
    
    static void initWorms() {
        Thing t;
        
        t=Lib.extend("기본 구더기", "기본 몬스터");
        t.set("IsWorm",1);
        t.set("IsBeast",1);
        t.set("빈도",25);
        stats(t,6,4,8,4,2,4,2,2);
        t.set("이동속도",90);
        t.set("이미지",624);
        t.set("RES:fire",-20);
        t.set("RES:poison",20);
        Lib.add(t);
        
        t=Lib.extend("거대 구더기","기본 구더기");
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        stats(t,8,7,3,15,1,12,1,1);
        t.set("최소레벨",4);
        t.set("이미지",624);
        Lib.add(t);
        
        t=Lib.extend("담즙 구더기","기본 구더기");
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        stats(t,18,17,13,35,1,22,1,1);
        t.set("최소레벨",11);
        t.set("이미지",621);
        Lib.add(t);
        
        t=Lib.extend("화염 구더기","기본 구더기");
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        stats(t,18,27,13,35,1,22,1,1);
        t.set("최소레벨",13);
        t.set("RES:fire",1000);
        t.set("RES:ice",20);
        t.set("이동속도",100);
        t.set("이미지",620);
        Lib.add(t);
        
        t=Lib.extend("암흑 구더기","기본 구더기");
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        stats(t,28,27,23,45,1,32,1,1);
        t.set("IsChaotic",1);
        t.set("최소레벨",15);
        t.set("이동속도",100);
        t.set("이미지",625);
        Lib.add(t);
        
        t=Lib.extend("시체청소부 구더기","기본 구더기");
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        stats(t,38,37,33,55,1,42,1,1);
        t.set("최소레벨",17);
        t.set("이동속도",100);
        t.set("공격속도",150);
        t.set("이미지",623);
        Lib.add(t);
        
    }
    
    static void initSnakes() {
        // Little critters
        // low level, quite common
        Thing t;
        
        t=Lib.extend("기본 뱀", "기본 몬스터");
        t.set("IsSnake",1);
        t.set("IsBeast",1);
        t.set("IsReptile",1);
        t.set("빈도",25);
        stats(t,6,4,8,4,2,4,2,2);
        t.set("이동속도",70);
        t.set("이미지",567);
        t.set("RES:ice",-5);
        t.set("RES:poison",20);
        t.set(Skill.SWIMMING,1);
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        t.set("아스키코드","s");
        Lib.add(t);
        
        t=Lib.extend("풀뱀", "기본 뱀");
        t.set("UnarmedWeapon",Lib.create("맨손 공격"));
		t.set("최소레벨",1);
        Lib.add(t);
        
        t=Lib.extend("작은 뱀", "풀뱀");
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
		t.set("최소레벨",2);
        Lib.add(t);
        
        t=Lib.extend("뱀", "기본 뱀");
		t.set("최소레벨",3);
		t.set("시체그래픽","blood pool,40% snake skin");
        Lib.add(t);
        
        t=Lib.extend("구렁이", "기본 뱀");
        stats(t,26,17,22,16,3,17,2,5);
		t.set("이미지",566);
        t.set("최소레벨",9);
		t.set("시체그래픽","blood pool,40% snake skin");
        Lib.add(t);
        
        t=Lib.extend("붉은 뱀", "기본 뱀");
        t.set("이미지",570);
        stats(t,16,7,12,6,3,7,2,3);
        t.set("최소레벨",6);
        t.set("RES:ice",-10);
        t.set("ARM",2);
		t.set("시체그래픽","blood pool,40% red snake skin");
        Lib.add(t);
        
        t=Lib.extend("불뱀", "붉은 뱀");
        stats(t,22,14,18,9,8,12,7,5);
        t.set("RES:ice",10);
        t.set("최소레벨",8);
        Lib.add(t);
        
        t=Lib.extend("악마 뱀", "불뱀");
        stats(t,26,19,28,29,18,23,16,12);
        t.addHandler("OnAction",Scripts.generator("불뱀",200));
        t.set("이동속도",60);
        t.set("공격속도",60);
        t.set("최소레벨",13);
        t.set("최대레벨",20);
        t.set("공포점수",2);
        t.set("ARM",6);
        t.set("이미지",568);
        Lib.add(t);
    }
    
    static void initSpiders() {
        Thing t;
        
        t=Lib.extend("기본 거미", "기본 몬스터");
        t.set("IsSpider",1);
        t.set("IsBeast",1);
        t.set("빈도",50);
        Monster.stats(t,5,5,6,8,3,9,1,3);
        t.set("이동속도",100);
        t.set("이미지",164);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        t.set("최소레벨",1);
        t.set("RES:fire",-10);
        t.set("ARM",1);
        t.set("아스키코드","s");
        Lib.add(t);    	
    	
        t=Lib.extend("작은 거미", "기본 거미");
        t.set("이미지",164);
        Monster.stats(t,5,3,5,2,3,9,1,3);
        t.set("최소레벨",1);
        t.set("ARM",1);
        t.set("시체그래픽", "20% squished spider, blood pool");
        Lib.add(t);
         
        t=Lib.extend("거미", "기본 거미");
        t.set("이미지",164);
        Monster.stats(t,7,5,8,6,3,12,1,3);
        t.set("최소레벨",4);
        t.set("시체그래픽", "20% dead spider, blood pool");
        Lib.add(t);

        t=Lib.extend("늑대거미", "기본 거미");
        t.set("이미지",184);
        Monster.stats(t,9,6,9,9,3,15,1,4);
        t.set("이동속도",120);
        t.set("공격속도",120);        
        t.set("ARM",3);
        t.set("최소레벨",6);
        t.set("시체그래픽", "30% dead wolf spider, blood pool");
        Lib.add(t);

        t=Lib.extend("대형 거미", "기본 거미");
        t.set("이미지",184);
        Monster.stats(t,12,10,10,18,3,20,2,5);
        t.set("최소레벨",7);
        t.set("ARM",5);
        t.addHandler("OnAction",Scripts.generator("spider web",20));
        t.set("시체그래픽", "40% dead spider, blood pool");
        Lib.add(t);
        
        t=Lib.extend("붉은 거미", "기본 거미");
        Monster.stats(t,13,7,12,15,4,18,2,6);
        t.set("이미지",165);
        t.set("ARM",6);
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        t.set("최소레벨",8);
        t.set("시체그래픽", "30% dead red spider, blood pool");
        Lib.add(t);  
        
        t=Lib.extend("검은 미망인 거미", "기본 거미");
        Monster.stats(t,33,12,22,15,4,28,4,8);
        t.set("이미지",583);
        t.set("ARM",7);
        t.set("UnarmedWeapon",Lib.create("맹독 공격"));
        t.set("최소레벨",13);
        t.set("시체그래픽", "40% dead black widow, blood pool");
        Lib.add(t);  

        t=Lib.extend("어린 거대 거미", "기본 거미");
        Monster.stats(t,12,10,10,10,3,20,2,5);
        t.set("이미지",167);
        t.set("ARM",8);
        t.set("부패율",10);
        t.set("부패종류","거대 거미");
        t.addHandler("OnAction",Scripts.decay());
        t.set("최소레벨",13);
        t.set("시체그래픽", "30% dead spider, blood pool");
        Lib.add(t);
        
        t=Lib.extend("거대 거미", "기본 거미");
        Monster.stats(t,23,19,18,25,6,28,4,10);
        t.set("이미지",187);
        t.set("ARM",18);
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        t.addHandler("OnAction",Scripts.generator("giant spider web",20));
        t.set("최소레벨",14);
        t.set("시체그래픽", "40% dead spider, blood pool");
        Lib.add(t);        
        
        t=Lib.extend("타란튤라", "기본 거미");
        Monster.stats(t,33,29,28,35,6,48,6,12);
        t.set("이미지",585);
        t.set("ARM",18);
        t.set("UnarmedWeapon",Lib.create("맹독 공격"));
        t.set("최소레벨",21);
        t.set("시체그래픽", "20% dead tarantula, blood pool");
        Lib.add(t);
        
        t=Lib.extend("거대 타란튤라", "타란튤라");
        Monster.stats(t,33,39,28,55,6,68,6,15);
        t.set("이미지",585);
        t.set("ARM",30);
        t.set("UnarmedWeapon",Lib.create("맹독 공격"));
        t.set("최소레벨",24);
        t.set("시체그래픽", "50% dead tarantula, blood pool");
        Lib.add(t);
        
    }
    
    public static void initRalkans() {
        Thing t;
        
        t=Lib.extend("기본 랄칸", "기본 몬스터");
        t.set("IsSpider",1);
        t.set("빈도",50);
        Monster.stats(t,25,25,12,48,5,29,3,3);
        t.set("이동속도",80);
        t.set("이미지",186);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        t.set("최소레벨",15);
        t.set("ARM",40);
        t.set("아스키코드","R");
        Lib.add(t);    
        
        t=Lib.extend("갓 태어난 랄칸", "기본 랄칸");
        t.set("이미지",166);
        t.set("ARM",30);
        t.set("부패율",3);
        t.set("부패종류","성장한 랄칸");
        t.addHandler("OnAction",Scripts.decay());
        t.set("최소레벨",15);
        Lib.add(t);
        
        t=Lib.extend("성장한 랄칸", "기본 랄칸");
        Monster.strengthen(t,2);
        t.set("이미지",186);
        t.set("ARM",90);
        t.addHandler("OnAction",Scripts.generator("갓 태어난 랄칸",5));
        t.set("최소레벨",18);
        Lib.add(t);   
    }
    
    static void initCritters() {
        // Little critters
        // low level, quite common
        Thing t;
        
        t=Lib.extend("기본 짐승", "기본 몬스터");
        t.set("IsCritter",1);
        t.set("빈도",50);
        t.set("최소레벨",1);
        t.set("IsBeast",1);
        t.set("UnarmedWeapon",Lib.create("물기 공격"));
        Lib.add(t);
        
        t=Lib.extend("새앙쥐", "기본 짐승");
        t.set("이미지",283);
        t.set("IsRat",1);
        t.set("최소레벨",2);
        stats(t,3,2,3,2,1,2,1,1);
        t.set("시체그래픽","blood pool,20% rat tail");
        t.set("아스키코드","r");
        Lib.add(t);
        
        t=Lib.extend("들쥐", "새앙쥐");
        t.set("이미지",283);
        t.set("최소레벨",1);
        t.set("최대레벨",3);
        stats(t,3,1,4,1,1,1,1,1);
        t.set("시체그래픽","blood pool,20% mouse tail");
        Lib.add(t); 
        
        t=Lib.extend("작은 쥐", "새앙쥐");
        t.set("이미지",283);
        t.set("최소레벨",1);
        t.set("최대레벨",3);
        stats(t,4,1,3,1,1,1,1,1);
        Lib.add(t);        
        
        t=Lib.extend("큰 쥐", "새앙쥐");
        t.set("최소레벨",3);
        stats(t,4,4,5,4,1,3,1,1);
        Lib.add(t);
        
        // nasty sewer rat breeder
        t=Lib.extend("시궁쥐", "새앙쥐");
        t.set("최소레벨",4);
        t.set("최대레벨",12);
        t.set("이미지",296);
        t.set("IsGenerator",1);
        t.addHandler("OnAction",Scripts.generator("시궁쥐",10));
        stats(t,5,3,6,3,3,6,1,5);
        Lib.add(t);
        
        t=Lib.extend("거대 쥐", "새앙쥐");
        stats(t,6,7,6,8,2,8,2,2);
        t.set("최소레벨",5);
        t.set("최대레벨",10);
        t.set("이미지",284);
        Lib.add(t);
        
        // nasty chaos rat breeder
        t=Lib.extend("암흑 쥐", "새앙쥐");
        t.set("최소레벨",8);
        t.set("이미지",295);
        t.set("IsGenerator",1);
        t.set("IsChaotic",1);
        t.addHandler("OnAction",Scripts.generator("암흑 쥐",30));
        t.set("UnarmedWeapon",Lib.create("독 공격"));
        stats(t,10,8,16,8,5,8,2,7);
        Lib.add(t);
        
        
    }
    
    static void initDogs() {
    	Thing t;
    	
        t=Lib.extend("개", "기본 짐승");
        t.set("이미지",287);
        t.set("최소레벨",3);
        t.set("이동속도",130);
        t.set(Skill.SWIMMING,1);
        t.set(Skill.UNARMED,1);
        stats(t,7,6,5,5,1,3,1,1);
        t.set("아스키코드","d");
        Lib.add(t);
        
        t=Lib.extend("대형견", "기본 짐승");
        t.set("이미지",287);
        t.set("최소레벨",6);
        t.set("이동속도",120);
        stats(t,7,9,4,9,2,5,2,2);
        Lib.add(t);
        
        t=Lib.extend("사냥개", "기본 짐승");
        t.set("이미지",287);
        t.set("최소레벨",9);
        t.set("이동속도",150);
        t.set("공격속도",150);
        stats(t,17,12,14,19,2,5,2,2);
        Lib.add(t);
    }
    
    static void initFrogs() {
    	Thing t;
    	
        t=Lib.extend("기본 개구리", "기본 짐승");
        t.set("IsFrog",1);
        t.set("IsBeast",1);
        t.set("이미지",521);
        t.set(Skill.SWIMMING,3);
        t.multiplyStat("빈도",0.3);
        t.set("이동속도",100);
        stats(t,3,4,7,4,4,7,1,1);
        t.set("최소레벨",2);
        t.set("RES:fire",-15);
        t.set("RES:poison",20);
        t.set("RES:acid",100);
        t.set("UnarmedWeapon",Lib.create("부식 공격"));
        t.set("아스키코드","f");
        t.set("시체그래픽","blood pool,30% frog leg");
        Lib.add(t);
        
        t=Lib.extend("거대 개구리", "기본 개구리");
        t.set("이미지",521);
        stats(t,10,6,16,9,4,25,2,2);
        t.set("최소레벨",13);    
        Lib.add(t);
        
        t=Lib.extend("거대 두꺼비", "기본 개구리");
        t.set("이미지",520);
        stats(t,26,18,24,29,4,45,2,2);
        t.set("ARM",10);
        t.set(Skill.DEFENCE,1);
        t.set("최소레벨",16);   
        t.set("시체그래픽","blood pool,30% toad leg");
        Lib.add(t);
        
        t=Lib.extend("뿔두꺼비", "거대 두꺼비");
        t.set("이미지",522);
        stats(t,46,35,50,69,34,85,6,27);
        t.set(Skill.ATTACK,1);
        t.set(Skill.DEFENCE,2);
        t.set("ARM",25);
        t.set("최소레벨",19);    
        Lib.add(t);
    }
    
    static void initSlimes() {
    	Thing t;
    	
    	t=Lib.extend("기본 점액생물","기본 몬스터");
    	t.set("IsIntelligent",0);
    	t.set("IsLiving",0);
    	t.set("IsSlime",1);
        t.set("이미지",380);
        Lib.add(t);

    	t=Lib.extend("노란 점액생물","기본 점액생물");
        Monster.stats(t,10,10,10,10,1,5,0,0);
        t.set("최소레벨",4);
        t.set("이미지",383);
        Lib.add(t);   
        
    	t=Lib.extend("회색 점액생물","기본 점액생물");
        Monster.stats(t,15,15,10,30,1,15,0,0);
        t.set("최소레벨",7);
        t.set("이미지",381);
        {
        	ItemDamageHit idh=new ItemDamageHit("wielded","부식",50,10);
	        t.set("OnHit",idh);
        }
        Lib.add(t);
        
    	t=Lib.extend("보라색 점액생물","기본 점액생물");
        Monster.stats(t,10,10,10,20,1,10,0,0);
        t.set("최소레벨",8);
        t.set("이미지",380);
        t.set("OnTouch",Scripts.damage("부식",2,"hit by the noxious acid of the purple slime",25));
        Lib.add(t);
    
    	t=Lib.extend("붉은 점액생물","기본 점액생물");
        Monster.stats(t,20,20,20,40,1,25,0,0);
        t.set("최소레벨",9);
        t.set("이미지",382);
        {
        	ItemDamageHit idh=new ItemDamageHit("wielded","불",40,5);
	        t.set("OnHit",idh);
        }
        t.set("UnarmedWeapon",Lib.create("저주내림 공격"));
        t.set("시체그래픽","Fireball");
        Lib.add(t);

    }
    
    private static void initNamedFoes() {
    	Thing t;
    	
    	t=Lib.extend("보록","고블린 주술사");
    	Monster.strengthen(t,1.3);
    	Lib.add(t);
    }
}
